<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>519消防人才网</title>

    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<style>
    html,
    body {
        height: 100%;
        padding: 0;
        margin: 0;
        background: url("/static/images/data/20141101043443.jpeg");
        background-size: cover
    }

    .modal-dialog {
        margin-top: 50%;
    }

    a {
        color: #000
    }

    .container-fluid {
        max-width: 375px;
    }
</style>
<div class="container-fluid" style="padding-top:5px;color: #f5f5f5">
    <h3 style="text-align: center">519消防人才网</h3>
    <div style="font-size: 20px;line-height: 1.6;padding: 5px 20px 5px 20px">
        缺<span style="color: #f60">工作</span>？缺<span style="color: #f60">员工</span>？
    </div>
    <div style="text-align:right;font-size: 18px;line-height: 1.6;padding: 5px 20px 15px 20px">
        填写信息，一键全<span style="color: #f60">搞定</span>
    </div>
    {{--<div>--}}
    {{--缺工作？缺员工？--}}
    {{--</div>--}}
    <div style="background: rgba(255,255,255,0.3);padding: 20px;">
        <ul id="myTab" class="nav nav-tabs">
            <li class="active">
                <a href="#home" data-toggle="tab">个人</a>
            </li>
            <li>
                <a href="#ios" data-toggle="tab">企业</a>
            </li>
        </ul>
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade in active" id="home">
                <form class="form-horizontal" style="margin-top: 20px;" action="{{url('gather/index')}}" method="post"
                      id="person_from">
                    <div class="form-group">
                        <div class="col-sm-12">
                            <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
                            <input name="status" type="hidden" class="form-control" value="1">
                            <input name="nickname" class="form-control" placeholder="姓名">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <input name="mobile" class="form-control" placeholder="联系电话">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">

                            <select class="form-control" name="">
                                <option value="0">暂无消控证</option>
                                <option value="1">初级消控证</option>
                                <option value="2">终极销控证</option>
                                <option value="3">学校结业证</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-12">
                            <button type="button" class="btn btn-primary btn-block" data-from="person_from">提交</button>
                        </div>
                    </div>
                </form>
            </div>
            <div class="tab-pane fade" id="ios">
                <form class="form-horizontal" style="margin-top: 20px;" action="{{url('gather/index')}}" method="post"
                      id="company_from">
                    <div class="form-group">

                        <div class="col-sm-12">
                            <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
                            <input name="status" type="hidden" class="form-control" value="2">
                            <input name="company" class="form-control" placeholder="公司名称">
                        </div>
                    </div>
                    <div class="form-group">

                        <div class="col-sm-12">
                            <input name="nickname" class="form-control" placeholder="联系人">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <input name="mobile" class="form-control" placeholder="联系电话">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <input name="place" class="form-control" placeholder="招聘岗位">
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-12">
                            <button type="button" class="btn btn-primary btn-block" data-from="company_from">提交</button>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>
    <div style="font-size: 14px;color:#f5f5f5;line-height:1.8;margin-top: 15px;text-align: right">
        联系电话:0432-65817458
    </div>
    <div style="font-size: 14px;color:#f5f5f5;line-height:1.8;text-align: right">
        联&nbsp&nbsp系&nbsp&nbsp人:张经理
    </div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <div style="text-align: center">
                    <button type="button" class="btn btn-default btn-lg" data-toggle="modal" data-target="#myModal">
                        个人用户入口
                    </button>
                </div>
                <div style="text-align: center;margin-top: 10px;">
                    <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
                        企业用户入口
                    </button>
                </div>
            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
<script>
    // $("#myModal").modal('show');
    $('.btn-block').click(function () {
        var from = $(this).data('from');
        var data = $('#' + from).serialize();
        $.ajaxSetup({
            headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}'}
        });
        $.ajax({
            //几个参数需要注意一下
            type: "POST",//方法类型
            dataType: "json",//预期服务器返回的数据类型
            url: "{{url('gather/index')}}",//url
            data: data,
            success: function (result) {
                alert(result.msg);
                if(result.error == 0){
                    window.location.reload();
                }
            },
            error: function () {
                alert("异常！");
            }
        });
    })

</script>
</body>
</html>